{include file="public/head" title="认证" keywords="认证" description="认证" /}
<style>
    .toauth span{
        font-size: 0.7rem;
    }
    .toauth input{
        font-size: 0.7rem;
    }
    .mui-switch:before{
        top:-15px;
    }
    .mui-switch.mui-active{
        border-color:#01cebf;
        background-color:#01cebf;
    }

</style>
<div id="offCanvasWrapper" class="mui-off-canvas-wrap mui-draggable">
    <!-- 菜单容器 -->

    <div class="mui-inner-wrap">
        <div id="offCanvasContentScroll" class="mui-content mui-scroll-wrapper" style="background-color: #fff;">
            <div class="mui-scroll">
                <header class="tx_head">
                    <p>
                        <a href="javascript:history.go(-1)" class="header_p1"><span class="mui-icon mui-icon-arrowleft"></span></a>
                    <h5>支付</h5>
                    </p>
                </header>
                <main class="wdzh_main">
                    <section>
                        <ul class="">
                            <li class="jyjl_li" style="border-bottom: 7px solid #f3f3f3;line-height: 0;height: 0.1rem;">

                            </li>
                            <li  class="toauth"><span style=" margin-right: 28px;   margin-left: 2.5rem;">订单编号:</span>

                                <span style=" margin-right: 28px;   margin-left: 0.5rem;">{$payInfo.bianhao}</span>
                            </li>
                            <li class="toauth">
                                <span style="margin-right: 28px;margin-left: 2.5rem;">产品名称:</span>
                                <span style="margin-right: 28px;margin-left: 0.5rem;">{$payInfo.body}</span>

                            </li>

                            <li class="toauth"><span style="margin-right: 28px;margin-left: 2.5rem;">商品价格:</span>
                                <span style="margin-right: 28px;margin-left: 0.5rem;">{$payInfo.fee}</span>

                            </li>

                            <li class="toauth " style="padding: 10px;text-align: center;border-bottom:none">
                                <input style="width: 280px;height: 2rem; background: #01cebf;font-size: 1rem;" type="submit" id="bank_btn" value="提交" placeholder=""/>
                            </li>

                        </ul>

                    </section>
                </main>
                <br>
                <br>
                <br>
                <br>
                <br>
                <br>
            </div>
        </div>
        <div class="mui-off-canvas-backdrop"></div>
    </div>
</div>

<input type="hidden" name="price" value="{$payInfo.fee}">
{include file="public/footer"}
</body>
<script>

    function jsApiCall()
    {
        WeixinJSBridge.invoke(
            'getBrandWCPayRequest',{$payRes},
            function(res){
                if(res.err_msg == "get_brand_wcpay_request:ok"){
                    var money = $('input[name="price"]').val();
                    window.location.href="{:url('notify',['money'=>'"+money+"'])}";

                }else if(res.err_msg == "get_brand_wcpay_request:cancel"){

                }else{
                    alert("支付失败!");
                    }
            });
    }


    $("#bank_btn").click(function(){
        if (typeof WeixinJSBridge == "undefined"){
            if( document.addEventListener ){
                document.addEventListener('WeixinJSBridgeReady', jsApiCall, false);
            }else if (document.attachEvent){
                document.attachEvent('WeixinJSBridgeReady', jsApiCall);
                document.attachEvent('onWeixinJSBridgeReady', jsApiCall);
            }
        }else{
            jsApiCall();
        }

    });

</script>
</html>

